package com.hsmw.api.controller.concrete;


import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.hsmw.api.service.HsmwConcreteInfoService;
import com.hsmw.api.service.HsmwConcretePlantInfoService;
import com.hsmw.api.service.HsmwItemConcreteRelationService;
import com.htn.common.core.base.DataResponse;
import com.htn.common.core.constant.CommonConstants;
import com.hsmw.domain.HsmwConcreteInfo;
import com.hsmw.domain.HsmwConcretePlantInfo;
import com.hsmw.domain.HsmwItemConcreteRelation;
import com.hsmw.domain.HsmwOrder;
import com.hsmw.domain.vo.OrderQueryVO;
import com.hsmw.domain.vo.QueryParamsVO;
import com.hsmw.domain.vo.QueryVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;
import com.hsmw.common.base.BaseController;

import java.util.List;

/**
 * <p>
 * 搅拌站详情表 前端控制器
 * </p>
 *
 * @author tjy
 * @since 2021-08-10
 */
@Api(tags = "搅拌站")
@RestController
@RequestMapping("/hsmw/concrete")
public class HsmwConcretePlantInfoController extends BaseController<HsmwConcretePlantInfoService, HsmwConcretePlantInfo> {




    @Autowired
    private HsmwConcretePlantInfoService hsmwConcretePlantInfoService;

    @Autowired
    private HsmwItemConcreteRelationService hsmwItemConcreteRelationService;


    @ApiOperation(value = "查询混凝土订单",notes = "查询混凝土订单")
    @ApiImplicitParam(name = "param",value = "查询完成 未完成订单 完成：2，未完成：1",dataType = "String")
    @PostMapping("findConcreteOrderList")
    public DataResponse findConcreteOrderList(String param){


        return hsmwConcretePlantInfoService.findConcreteOrderList(param);
    }


    @ApiOperation(value = "根据订单id查询订单详情",notes = "查询混凝土订单")
    @ApiImplicitParam(name = "id",value = "订单id",dataType = "String")
    @PostMapping("findConcreteOrderListById")
    public DataResponse findConcreteOrderListById(String id){


        return new DataResponse(hsmwConcretePlantInfoService.findConcreteOrderListById(id));
    }


    @ApiOperation(value = "泵车订单",notes = "泵车订单")
    @ApiImplicitParam(name = "id",value = "订单id",dataType = "String")
    @PostMapping("findOrderListInfoByOrderId")
    public DataResponse findOrderListInfoByOrderId(String id){

        return new DataResponse(hsmwConcretePlantInfoService.findOrderListInfoByOrderId(id));
    }





    @ApiOperation(value = "从混天凝要泵车",notes = "从混天凝要泵车")
    @ApiImplicitParam(name = "id",value = "订单id",dataType = "String")
    @PostMapping("mixingReassignmentOrder")
    public DataResponse mixingReassignmentOrder(String id){

        return hsmwConcretePlantInfoService.mixingReassignmentOrder(id);
    }

    @ApiOperation(value = "查询泵车订单需求信息",notes = "查询泵车订单需求信息")
    @ApiImplicitParam(name = "id",value = "订单id",dataType = "String")
    @PostMapping("findVehicleRequestById")
    public DataResponse findVehicleRequestById(String id){


        return new DataResponse(hsmwConcretePlantInfoService.findVehicleRequestById(id));
    }

    @ApiOperation(value = "查询搅拌站信息",notes = "查询项目下的搅拌站信息")
    @PostMapping("findItemConcreteListById")
    public DataResponse findItemConcreteListById(){

        return new DataResponse(hsmwConcretePlantInfoService.list());
    }





}

